{"version":3,"sources":["webpack://_N_E/./src/utils/protect-route.tsx","webpack://_N_E/./src/services/sanity/serializers.tsx","webpack://_N_E/./src/components/rich-text/rich-text.styles.ts","webpack://_N_E/./src/components/rich-text/rich-text.tsx","webpack://_N_E/./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?9452","webpack://_N_E/./node_modules/react-use/esm/useEffectOnce.js","webpack://_N_E/./src/components/ui/content-section.tsx","webpack://_N_E/./src/pages/404.tsx","webpack://_N_E/./src/pages/reminder/.tsx"],"names":["protectRoute","Component","props","useAuth","isAuthenticated","isAnonymous","loading","router","useRouter","useEffect","push","APP_ROUTES","users","signIn","serializers","types","block","children","node","style","as","size","marks","link","mark","blank","href","target","rel","internalLink","downloadResourceUrl","slug","_type","StyledBlockContent","styled","BlockContent","rem","theme","components","text","Text","RichText","blocks","window","__NEXT_P","effect","StyledSection","Section","wrapperBg","StyledSectionWrapper","SectionWrapper","colors","palette","white","borderRadius","medium","BackLinkWrapper","ContentSection","textAlign","className","backLink","to","ReminderContent","black","Custom404","siteSettings","useSiteSettings","mainBackground","backgroundImages","treesBurn","title","description","home","id","query","useQuery","getUpcomingEventById","initialData","data","isLoading","reminderNotFound","_id","useEffectOnce","AnalyticsService","trackScreen","ScreenNames","reminderDetail","errorCode","account","color","formatReminderDate","startDate","endDate","body"],"mappings":"ubAKO,SAASA,EACdC,GAEA,OAAO,SAACC,GAAiB,MAC2BC,cAA1CC,EADe,EACfA,gBAAiBC,EADF,EACEA,YAAaC,EADf,EACeA,QAChCC,EAASC,sBAUf,OARAC,qBAAU,WAEFL,IAAmBC,GAAiBC,GACxCC,EAAOG,KAAKC,IAAWC,MAAMC,UAE9B,CAACP,EAASF,EAAiBC,EAAaE,IAGpCH,IAAoBC,EAAc,cAACJ,E,yWAAD,IAAeC,IAAY,Q,qLCC3DY,G,UAAgD,CAC3DC,MAAO,CACLC,MAjBkB,SAAC,GAA4B,IAA1BC,EAA0B,EAA1BA,SAGvB,OAHiD,EAAhBC,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D,uBACY,IACV,cAAC,IAAD,CAAMM,KAAMf,IAAW6D,KAAvB,SACE,uCAHJ,e,kTC2EOxE,uBA9EmB,SAACE,GACjC,IACQuE,EADOjE,sBACOkE,MAAdD,GAFmC,EAGfE,YAC1B,CAACF,IACD,kBAAMG,YAAqBH,KAC3B,CACEI,YAAa3E,EAAM4E,OAJfA,EAHmC,EAGnCA,KAAMC,EAH6B,EAG7BA,UAORC,GAAoBD,KAAeD,KAAQ,OAACA,QAAD,IAACA,KAAMG,MAQxD,OANAC,aAAc,WACPF,GACHG,IAAiBC,YAAYC,IAAYC,mBAIzCpF,EAAMqF,WAAaP,EACd,cAAC,UAAD,IAIP,qCACE,cAAC,IAAD,CAAKV,OAAW,OAAJQ,QAAI,IAAJA,OAAA,EAAAA,EAAMR,QAAS,eAC3B,cAAC,IAAD,CAAQH,eAAgBC,IAAiBC,UAAzC,SACE,eAAC,IAAD,CAAiBT,SAAUjD,IAAW6E,QAAtC,UACGT,GAAa,cAAC,IAAD,CAASU,MAAM,UAC5BX,GAAQA,EAAKG,KACZ,qCACE,cAAC,IAAD,CAAM7D,GAAG,OAAT,SACGsE,YAAmBZ,EAAKa,UAAWb,EAAKc,WAE3C,cAAC,IAAD,CAAIxE,GAAG,KAAP,SAAa0D,EAAKR,QAClB,cAAC,IAAD,CAAU5B,OAAQoC,EAAKe,uB","file":"static/chunks/pages/reminder/[id]-ecf479b9322c2da06ebf.js","sourcesContent":["import useAuth from 'hooks/use-auth';\nimport { useRouter } from 'next/router';\nimport React, { useEffect } from 'react';\nimport APP_ROUTES from 'utils/routes';\n\nexport function protectRoute(\n Component: React.ComponentType\n) {\n return (props: Route) => {\n const { isAuthenticated, isAnonymous, loading } = useAuth();\n const router = useRouter();\n\n useEffect(() => {\n // Redirect all \"unreal\" users.\n if ((!isAuthenticated || isAnonymous) && !loading) {\n router.push(APP_ROUTES.users.signIn);\n }\n }, [loading, isAuthenticated, isAnonymous, router]);\n\n // Only allow \"real\" users to see the component.\n return isAuthenticated && !isAnonymous ? : null;\n };\n}\n","import { BlockContentProps } from '@sanity/block-content-to-react';\nimport { H4, H5 } from 'components/headings';\nimport { Text } from 'components/ui/text';\nimport Link from 'next/link';\nimport React from 'react';\n\nconst BlockRenderer = ({ children, node }: any) => {\n const style = node.style || 'normal';\n\n switch (style) {\n case 'h2':\n return

{children}

;\n case 'h3':\n return
{children}
;\n case 'large':\n return {children};\n default:\n return {children};\n }\n};\n\nexport const serializers: BlockContentProps['serializers'] = {\n types: {\n block: BlockRenderer,\n },\n marks: {\n link: ({ mark, children }) => {\n // Read https://css-tricks.com/use-target_blank/\n const { blank, href } = mark;\n return blank ? (\n \n {children}\n \n ) : (\n {children}\n );\n },\n internalLink: ({ mark, children }) => {\n if (mark.downloadResourceUrl) {\n return (\n \n {children}\n \n );\n }\n if (mark.slug) {\n const { slug = {}, blank } = mark;\n const href = `/${slug}`;\n return (\n \n {blank ? (\n \n {children}\n \n ) : (\n {children}\n )}\n \n );\n }\n\n return (\n \n Unknown mark: {mark._type}.\n \n );\n },\n },\n};\n","import BlockContent from '@sanity/block-content-to-react';\nimport { Text } from 'components/ui/text';\nimport { rem } from 'polished';\nimport styled from 'styled-components';\n\nexport const StyledBlockContent = styled(BlockContent)`\n margin-top: ${rem(20)};\n color: ${({ theme }) => theme.components.text.text};\n line-height: 1.4;\n\n > * {\n margin: 0;\n }\n\n > * + * {\n margin-top: ${rem(20)};\n }\n\n p {\n line-height: inherit;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n + p,\n + ${Text} {\n margin-top: ${rem(10)};\n }\n }\n\n ul,\n ol {\n padding-left: ${rem(30)};\n\n * + * {\n margin-top: ${rem(10)};\n }\n }\n\n /* stylelint-disable -- Disabled so we can use specific order of properties\n Source: https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/\n */\n a {\n /* These are technically the same, but use both */\n overflow-wrap: break-word;\n word-wrap: break-word;\n\n -ms-word-break: break-all;\n /* This is the dangerous one in WebKit, as it breaks things wherever */\n word-break: break-all;\n /* Instead use this non-standard one: */\n word-break: break-word;\n\n /* Adds a hyphen where the word breaks, if supported (No Blink) */\n -ms-hyphens: auto;\n -moz-hyphens: auto;\n -webkit-hyphens: auto;\n hyphens: auto;\n }\n /* stylelint-enable */\n`;\n","import React, { FC } from 'react';\nimport { serializers } from 'services/sanity/serializers';\nimport { StyledBlockContent } from './rich-text.styles';\n\ninterface Props {\n blocks: any[] | any;\n}\n\nconst RichText: FC = ({ blocks }) => {\n return ;\n};\n\nexport default RichText;\n","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/reminder/[id]\",\n function () {\n return require(\"private-next-pages/reminder/[id].tsx\");\n }\n ]);\n ","import { useEffect } from 'react';\nvar useEffectOnce = function (effect) {\n useEffect(effect, []);\n};\nexport default useEffectOnce;\n","import BackLink from 'components/back-link';\nimport SwitchTheme from 'components/switch-theme';\nimport { rem } from 'polished';\nimport { FC } from 'react';\nimport styled from 'styled-components';\nimport { Section, SectionProps } from './section';\nimport { SectionWrapper } from './section-wrapper';\n\nconst StyledSection = styled(Section)<{ wrapperBg?: boolean }>`\n position: relative;\n margin-top: var(--header-height);\n padding: ${({ wrapperBg }) => (wrapperBg ? `${rem(10)} ${rem(30)}` : 0)};\n background: none;\n`;\n\nconst StyledSectionWrapper = styled(SectionWrapper)`\n background-color: ${({ wrapperBg, theme }) =>\n wrapperBg ? theme.colors.palette.white : 'transparent'};\n border-radius: ${({ theme }) => theme.borderRadius.medium};\n box-shadow: ${({ wrapperBg }) =>\n wrapperBg ? '0 4px 45px rgba(0, 0, 0, 0.8)' : 'none'};\n`;\n\nconst BackLinkWrapper = styled(SectionWrapper)`\n padding: 0 ${rem(10)} ${rem(20)};\n\n a {\n margin-bottom: 0;\n }\n`;\n\ninterface Props extends SectionProps {\n wrapperBg?: boolean;\n className?: string;\n backLink?: string;\n}\n\nconst ContentSection: FC = ({\n children,\n wrapperBg,\n textAlign,\n className,\n backLink,\n}) => {\n return (\n \n \n {backLink && (\n \n Back\n \n )}\n \n {children}\n \n \n \n );\n};\n\nexport default ContentSection;\n\nexport const ReminderContent = styled(ContentSection)`\n time {\n margin: 0 0 ${rem(5)};\n font-size: ${rem(14)};\n }\n\n ${StyledSectionWrapper} {\n color: ${({ theme }) => theme.colors.palette.black};\n\n > *:last-child {\n margin-bottom: 0;\n }\n }\n`;\n","import { H4 } from 'components/headings';\nimport Layout from 'components/layout';\nimport SEO from 'components/seo';\nimport ContentSection from 'components/ui/content-section';\nimport { Text } from 'components/ui/text';\nimport { useSiteSettings } from 'hooks/use-siteSettings';\nimport { GetStaticProps } from 'next';\nimport Link from 'next/link';\nimport { backgroundImages } from 'utils/config';\nimport APP_ROUTES from 'utils/routes';\n\n// Reference: https://nextjs.org/docs/advanced-features/custom-error-page\n\nexport default function Custom404() {\n const { siteSettings } = useSiteSettings();\n\n return (\n \n \n \n

404 - Page Not Found

\n \n We can't seem to find the page you're looking for. It may be because\n we have recently updated our website and some content has been moved\n or deleted.\n \n \n Return to{' '}\n \n Home\n \n .\n \n
\n
\n );\n}\n\nexport const getStaticProps: GetStaticProps = async () => {\n return {\n props: {},\n };\n};\n","import { getUpcomingEventById, getUpcomingEvents } from 'api/cms';\nimport { H4 } from 'components/headings';\nimport Layout from 'components/layout';\nimport RichText from 'components/rich-text';\nimport SEO from 'components/seo';\nimport Spinner from 'components/spinner';\nimport { ReminderContent } from 'components/ui/content-section';\nimport { Text } from 'components/ui/text';\nimport { format } from 'date-fns';\nimport { GetStaticPaths, GetStaticProps, NextPage } from 'next';\nimport { useRouter } from 'next/router';\nimport Custom404 from 'pages/404';\nimport { useQuery } from 'react-query';\nimport { useEffectOnce } from 'react-use';\nimport AnalyticsService, { ScreenNames } from 'services/analytics';\nimport { UpcomingEvent } from 'types/sanity';\nimport { backgroundImages } from 'utils/config';\nimport { formatReminderDate } from 'utils/helpers';\nimport { protectRoute } from 'utils/protect-route';\nimport APP_ROUTES from 'utils/routes';\n\ninterface Props {\n data?: UpcomingEvent;\n errorCode?: number;\n}\n\nconst Reminder: NextPage = (props) => {\n const router = useRouter();\n const { id } = router.query;\n const { data, isLoading } = useQuery(\n [id],\n () => getUpcomingEventById(id as string),\n {\n initialData: props.data,\n }\n );\n const reminderNotFound = !isLoading && (!data || !data?._id);\n\n useEffectOnce(() => {\n if (!reminderNotFound) {\n AnalyticsService.trackScreen(ScreenNames.reminderDetail);\n }\n });\n\n if (props.errorCode || reminderNotFound) {\n return ;\n }\n\n return (\n <>\n \n \n \n {isLoading && }\n {data && data._id && (\n <>\n \n {formatReminderDate(data.startDate, data.endDate)}\n \n

{data.title}

\n \n \n )}\n
\n
\n \n );\n};\n\nexport const getStaticProps: GetStaticProps = async ({ params }) => {\n const id = params?.id as string;\n\n const data = await getUpcomingEventById(id);\n\n // Page doesn't exist\n if (!data) {\n return {\n props: { errorCode: 404 },\n };\n }\n\n return {\n props: {\n data,\n },\n };\n};\n\nexport const getStaticPaths: GetStaticPaths = async () => {\n const dateStr = format(new Date(), 'yyyy-MM-dd');\n const upcomingEvents = await getUpcomingEvents(dateStr);\n const paths =\n upcomingEvents?.map((event: UpcomingEvent) => ({\n params: {\n id: event._id,\n },\n })) || [];\n\n return {\n paths,\n fallback: false,\n };\n};\n\nexport default protectRoute(Reminder);\n"],"sourceRoot":""}